/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package datacoletor;

import filesJavacc.ParseException;
import filesJavacc.TokenMgrError;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Heitor
 */
public class DataColetor {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws ParseException {
        // TODO code application logic here
        
        Extractor test = new Extractor();
        try {
            test.analysis();
            //test.statrGenerator();
        } catch (TokenMgrError ex) {
            Logger.getLogger(DataColetor.class.getName()).log(Level.SEVERE, null, ex);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(DataColetor.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(DataColetor.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    //        
    //        try{ 
    ////            File file2=new File("/as.txt"); 
    ////            System.out.println("Testeee111");
    ////            File file=new File("/as.bat"); 
    ////            FileOutputStream fo = new FileOutputStream(file); 
    ////            PrintWriter pw = new PrintWriter(fo);
    ////            pw.println("cd ..");
    ////            pw.println("cd Arquivos de programas\\Firebird\\Firebird_2_0\\bin\\");
    ////            pw.println("gsec -user sysdba -password masterkey -add + jTextField.getText() + -pw +jPasswordField.getText()+");
    ////            pw.println("exit");
    ////            pw.flush();
    ////            pw.close();
    ////            fo.close();
    ////            for(int h = 0; h<20; h++){
    ////                Runtime.getRuntime().exec("cd .."); 
    ////            }
    ////            //Runtime.getRuntime().exec("cmd.exe /C start notepad.exe");
    ////            Runtime.getRuntime().exec("cd javacc-5.0"); 
    ////            Runtime.getRuntime().exec("cd bin"); 
    ////            Runtime.getRuntime().exec("javacc.bat \"c:\\Users\\Heitor\\Documents\\NetBeansProjects\\adder2.jj\"");
    //            
    //            String cmd[] = {"cmd.exe", "/C", "cd .."};
    //            for(int h = 0; h<20; h++){
    //            Runtime.getRuntime().exec(cmd);
    //            }
    //            
    //            //String cmd1[] = {"cmd.exe", "/C", "cmd.exe"};            
    //            //Runtime.getRuntime().exec(cmd1);
    //            
    ////            Runtime.getRuntime().exec("cmd.exe /k c:\\as.bat"); 
    //           // Runtime.getRuntime().exec("mspaint.exe"); 
    //            System.out.println("Testeee111");
    ////            file.delete (); 
    //        }catch(Exception e){ 
    //            System.out.println("Testeee222");
    //        } 
    //        }
        
    }
}
